{% if page.mermaid or site.mermaid %}
<script src="https://cdn.jsdelivr.net/npm/mermaid/dist/mermaid.min.js"></script>
<script>
    $(document).ready(function () {
        mermaid.initialize({
            startOnLoad: true,
            theme: "default",
        });
        mermaid.init(undefined, $('.mermaid2'));
    });
</script>
{% endif %}